package com.ruoyi.ai.enums;

import lombok.Getter;

import java.util.Arrays;

/**
 * 聊天状态枚举
 */
@Getter
public enum MinioEventEnum {
    PUT("s3:ObjectCreated:Put", "上传文件"),
    DEL("s3:ObjectRemoved:Delete","删除文件")
    ;

    private final String type;
    private final String desc;

    MinioEventEnum(String type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static MinioEventEnum getByType(String type) {
        return Arrays.stream(values()).filter(c -> c.getType().equals(type)).findFirst().orElse(null);
    }
}
